package com.lzf.yh.userService.impl;

import com.lzf.yh.commons.JsonBean;
import com.lzf.yh.dao.Recommend_guitarMapper;
import com.lzf.yh.userService.Recommend_guitarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: Wyz
 * @Date: 2021/4/16 08:36
 * @Description:
 */
@Service
public class Recommend_guitarServiceImpl implements Recommend_guitarService {

    @Autowired
    private Recommend_guitarMapper recommend_guitarMapper;

    /**
     * 查询出所有推荐的吉他
     * @return
     */
    @Override
    public JsonBean selectAllRecommend_guitar() {
        return new JsonBean(0,"",recommend_guitarMapper.selectAllRecommend_guitar());
    }

    /**
     * 查询一个吉他推荐表中的吉他信息
     * @param id 查询条件
     * @return 返回的信息
     */
    @Override
    public JsonBean selectOneRecommend_guitar(Integer id) {
        return new JsonBean(0,"",recommend_guitarMapper.selectByPrimaryKey(id));
    }
}
